namespace Rsdn.Janus
{
    using CoreServices.NavigationTree.Extensibility;
    using SmartApp;

    internal class VirtualForumProviderStrategy :
        RegElementsStrategy<VirtualForumProviderInfo, VirtualForumProviderAttribute>
    {
        public VirtualForumProviderStrategy(IServicePublisher publisher)
            : base(publisher) { }

        #region Overrides of RegElementsStrategy<VirtualForumProviderInfo,VirtualForumProviderAttribute>

        public override VirtualForumProviderInfo CreateElement(
            ExtensionAttachmentContext context, 
            VirtualForumProviderAttribute attr)
        {
            return new VirtualForumProviderInfo(context.Type);
        }

        #endregion
    }
}